package com.love.cloud.admin.controller;

import com.love.cloud.admin.api.entity.SysAttentionApp;
import com.love.cloud.admin.service.SysAttentionAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author hongdongqu
 */
@RestController
@RequestMapping("/attention/app")
@Api(tags = "应用收藏模块")
public class AttentionAppController {
    @Resource
    private SysAttentionAppService sysAttentionAppService;

    @GetMapping("/getListByUserId")
    @ApiOperation(value = "获取收藏列表")
    public Object getListByUserId(String userId){
        return sysAttentionAppService.getListByUserId(userId);
    }


    @PostMapping("/collection")
    @ApiOperation(value = "添加/删除收藏")
    public Object collection(@RequestBody SysAttentionApp sysAttentionApp){
        return sysAttentionAppService.collection(sysAttentionApp);
    }



}
